<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="配送指令条码打印" active="activeFlag[0]">
            <div class="pos-a-full shuttle-box left d-b-15" style="right: 40%;top:35px;">
                <div class="row wrapper-y-sm items-center">
                    <div class="col-xs-4">
                        <div ng-if="isDL||isZHL">
                            <button class="btn btn-operate m-r-sm fl" ng-click="batchPrint()" translate>批量打印</button>
                            <div class="fl m-l flex">
                                <label><span translate>一物一码</span>：</label>
                                <label>
                                    <input type="radio" class="m-r-sm pull-left" yb-radio ng-model="condition.onePer" value="1" yb-radio-name="是">
                                    <input type="radio" class="m-r-sm pull-left" yb-radio ng-model="condition.onePer" value="0" yb-radio-name="否">
                                </label>
                            </div>
                        </div>
                    </div>
                    <div class="search-bar wrapper-none col-xs-8">
                        <div class="normal-search clearfix pull-right">
                            <label class="control-label">配送指令：</label>
                            <input type="text" class="form-control m-r-sm" ng-model="condition.deliveryInstructionNo">
                            <label class="control-label">行号：</label>
                            <input type="text" class="form-control m-r-sm" ng-model="condition.rowNo">
                            <span class="btn btn-primary" ng-click="search(1)">搜索</span>
                            <button class="btn-advance m-l-xs" ng-click="switchToolbar('AdvanceSearch')">高级搜索</button>
                        </div>
                    </div>
                </div>
                <div yb-table-fixed class="table-fixed-wrap has-head ">
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <thead>
                            <tr>
                                <th width="40" class="th-check text-center">
                                    <div yb-check-box yb-checked="markInfo.allCheckedMaterial" yb-click="selectAll(dataList, 'Material')"></div>
                                </th>
                                <th class="th-check" width="40"></th>
                                <th ng-repeat="itemCol in tableConfig.tableCol track by $index" width="{{itemCol.width}}">
                                    <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index"  ng-class="{'row-selected': $index === markInfo.cueRow}"
                                ng-click="selectRow($index)">
                                <td width="40" class="text-center">
                                    <div yb-check-box yb-checked="item.isChecked" yb-click="selectSingle(item, dataList, 'Material')"></div>
                                </td>
                                <td width="40">{{$index+1}}</td>
                                <td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index" width="{{itemCol.width}}" title="{{item[itemCol.dataField]}}">
                                    {{item[itemCol.dataField]}}
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0">请输入单据号搜索</div>
                </div>
            </div>

            <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)" reset-data="reset()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label"><span>供方代码</span>：</label>
                        <input ng-model="condition.supplierCode" class="form-control" placeholder="供方代码">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span>供货商名称</span>：</label>
                        <div yb-form-clear ng-model="condition.supplierName" select-obj="selectSupplier()" clear-form="clearSupplier()" tips-name="供货商"></div>
                    </div>
                </div>
            </div>

            <div class="pos-a-full shuttle-box right" style="left:60%;top:35px">
                <div class="box-head" style="width: auto;">
                    <span class="font-14">
                         打印参数
                    </span>
                    <button class="btn btn-operate pull-right m-t" ng-click="switchToolbar('PrintConf')">打印配置</button>
                </div>
                <div yb-print-conf show-toolbar="toolbarConfig.showPrintConf" ng-model="tempSet"></div>
                <div class="pos-a-full box-body has-head has-foot border-t">
                    <form name="form" class="main-wrap form-horizontal p-t clearfix" novalidate>
                        <div class="form-group col-xs-6">
                            <label class="col-xs-4 control-label">图号：</label>
                            <div class="col-xs-6 wrapper-none">
                                <input type="text" name="orawyd" class="form-control" ng-model="detailInfo.orawyd" maxlength="20">
                            </div>
                        </div>
                        <div class="form-group col-xs-6">
                            <label class="col-xs-4 control-label">条码描述：</label>
                            <div class="col-xs-6 wrapper-none">
                                <input type="text" name="barcodeDesc" class="form-control" ng-model="detailInfo.barcodeDesc" maxlength="50">
                            </div>
                        </div>
                        <div class="form-group col-xs-6">
                            <label class="col-xs-4 control-label">规格描述：</label>
                            <div class="col-xs-6 wrapper-none">
                                <input type="text" name="model" class="form-control" ng-model="detailInfo.model" maxlength="30">
                            </div>
                        </div>
                        <div class="form-group col-xs-6">
                            <label class="col-xs-4 control-label"><i>*</i>总数量：</label>
                            <div class="col-xs-6 wrapper-none">
                                <input type="text" name="totalQty" class="form-control" ng-model="detailInfo.totalQty"
                                       yb-number-input  disable-decimal="false" decimal-places="3"
                                       ng-keyup="countPack()">
                            </div>
                        </div>
                        <div class="form-group col-xs-6 m-b-xs">
                            <label class="col-xs-4 control-label"><i>*</i>包装数量：</label>
                            <div class="col-xs-6 wrapper-none">
                                <input type="text" name="packNum" class="form-control" ng-model="detailInfo.packNum" ng-keyup="setPackNum()">
                            </div>
                        </div>
                        <div class="pos-a-full border-t p-t-sm" style="top:160px; bottom: 10px;overflow: auto">
                            <div class="form-group" ng-repeat="item in packList track by $index">
                                <label class="col-xs-2 control-label">每包数量：</label>
                                <div class="col-xs-3 wrapper-none">
                                    <input type="text" name="vinid" class="form-control"  yb-number-input  disable-decimal="false" decimal-places="3" ng-model="item.currentQty">
                                </div>

                                <label class="col-xs-2 control-label">VIN码{{$index+1}}：</label>
                                <div class="col-xs-3 wrapper-none">
                                    <input type="text" name="vinid" class="form-control" ng-model="item.vinid" maxlength="25">
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="bottom-area btn-bar text-center border-t clearfix">
                    <button type="button" class="btn btn-default m-r-sm" ng-click="printTicket('preview')">预览打印</button>
                    <button type="button" class="btn btn-primary" ng-click="printTicket('print')"
                            ng-disabled="!btnPermission.packageCodePrint" title="{{!btnPermission.packageCodePrint?'无权限执行此操作':''}}">打印</button>
                </div>
            </div>
        </div>
    </div>
</div>

<div id="printXgcy" ng-include="'view/printTemplate/cyTicketTpl.html'" ng-show="false"></div>